<template>
	<j-cell-group>
		<j-cell title="SATA设备" :more="false">
			<view slot="tips">
				<switch :checked="StorageStoragePosition.SATA" disabled></switch>
			</view>
		</j-cell>
		<j-cell title="USB设备" :more="false">
			<view slot="tips">
				<switch :checked="StorageStoragePosition.USB" disabled></switch>
			</view>
		</j-cell>
		<j-cell title="SD卡" :more="false">
			<view slot="tips">
				<switch :checked="StorageStoragePosition.SD" disabled></switch>
			</view>
		</j-cell>
		<j-cell title="DVD刻录机" :more="false">
			<view slot="tips">
				<switch :checked="StorageStoragePosition.DVD" disabled></switch>
			</view>
		</j-cell>
	</j-cell-group>
</template>

<script>
export default {
    data() {
        return {
            token: '',
            StorageStoragePosition: {
                SATA: '',
                USB: '',
                SD: '',
                DVD: ''
            }
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
        this.token = options.token
        this.getconfig();
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {},
    methods: {
        getconfig() {
            uni.showLoading();
            let token = this.token;
            let data = {
                Name: 'Storage.StoragePosition'
            };
            getApp().globalData.api.getconfig(data, token, (result) => {
                uni.hideLoading({
                    success: (res) => {
                        console.log(result);
                        this.StorageStoragePosition = result['Storage.StoragePosition']
                    }
                });
            });
        }
    }
};
</script>
<style></style>
